﻿namespace WMS6.Web.TransportManagement
{
    using System;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class BolDetailQuery : BasePage
    {
        protected Button btnList;
        protected Button btnSearch;
        protected DropDownList ddlActualequipment;
        protected DropDownList ddlBolDetailID;
        protected DropDownList ddlCarrierID;
        protected DropDownList ddlDeliveryOrderID;
        protected DropDownList ddlDriverID;
        protected DropDownList ddlOwnerID;
        protected DropDownList ddlSkuID;
        protected HtmlForm form1;
        protected HtmlInputHidden hdnActionID;
        protected Label lblActualequipment;
        protected Label lblBolDetailID;
        protected Label lblBu;
        protected Label lblCarrierID;
        protected Label lblDeliveryOrderID;
        protected Label lblDriverID;
        protected Label lblOwnerID;
        protected Label lblSkuID;
        protected HtmlLink mycss;
        protected ScriptManager ScriptManager1;
        protected TextBox txtActualequipment;
        protected TextBox txtBolDetailID;
        protected TextBox txtCarrierID;
        protected TextBox txtDeliveryOrderID;
        protected TextBox txtDriverID;
        protected TextBox txtOwnerID;
        protected TextBox txtSkuID;

        protected void btnList_Click(object sender, EventArgs e)
        {
            base.Server.Transfer(string.Format("BolDetailList.aspx?action={0}&from=list", base.UrlEncode(this.hdnActionID.Value.Trim())), false);
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer(string.Format("BolDetailList.aspx?action={0}", base.UrlEncode(this.hdnActionID.Value.Trim())), false);
        }

        private void LoadDll()
        {
            base.InitQueryDDL(this.ddlBolDetailID, 0);
            base.InitQueryDDL(this.ddlDeliveryOrderID, 0);
            base.InitQueryDDL(this.ddlOwnerID, 0);
            base.InitQueryDDL(this.ddlSkuID, 0);
            base.InitQueryDDL(this.ddlCarrierID, 0);
            base.InitQueryDDL(this.ddlDriverID, 0);
            base.InitQueryDDL(this.ddlActualequipment, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                this.LoadDll();
            }
        }

        public string Actualequipment
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtActualequipment.Text.Trim()))
                {
                    return base.GetParamsString(this.txtActualequipment.Text.Trim(), this.ddlActualequipment.SelectedValue);
                }
                return "";
            }
        }

        public string BolDetailID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtBolDetailID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtBolDetailID.Text.Trim(), this.ddlBolDetailID.SelectedValue);
                }
                return "";
            }
        }

        public string CarrierID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtCarrierID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtCarrierID.Text.Trim(), this.ddlCarrierID.SelectedValue);
                }
                return "";
            }
        }

        public string DeliveryOrderID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtDeliveryOrderID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtDeliveryOrderID.Text.Trim(), this.ddlDeliveryOrderID.SelectedValue);
                }
                return "";
            }
        }

        public string DriverID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtDriverID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtDriverID.Text.Trim(), this.ddlDriverID.SelectedValue);
                }
                return "";
            }
        }

        public string OwnerID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtOwnerID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtOwnerID.Text.Trim(), this.ddlOwnerID.SelectedValue);
                }
                return "";
            }
        }

        public string SkuID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSkuID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSkuID.Text.Trim(), this.ddlSkuID.SelectedValue);
                }
                return "";
            }
        }
    }
}

